﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;                    // IO for File logging
using System.Diagnostics;           // StackFrame for Logging

namespace csharpTest
{
    class FileLog : Log
    {
        StreamWriter sw;

        public FileLog()
        {
        }

        public void Open(string filename)
        {
            //open File Stream
            sw = new StreamWriter(filename, true);
        }

        public void Close()
        {
            //close File Stream
            sw.Close();
        }

        public override void Write(StackFrame sf, string msg)
        {
            MakeMessage(sf, msg);
            sw.WriteLine(message);
        }
    }
}
